Adwaita: parametric bottom edge color for entries
authorLapo Calamandrei <calamandrei@gmail.com>
Wed, 3 Sep 2014 11:18:39 +0000 (13:18 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Wed, 3 Sep 2014 12:22:33 +0000 (14:22 +0200)
The entry mixin now allows to specify the color of the widget bottom
edge hilight, istead then just enable/disable it, so `$noegde: true`
now is `$egde: none` or `$edge: $somecolor`, not setting it draws
the edge with the default theme color.

gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/_drawing.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css

index 77a868098491874b9a1b9aecc46f0c6b309946be..73c03005659b96b11e146ac1042f79664cc90651 100644 (file)
@@ -232,7 +232,7 @@ GtkFlowBox .grid-child {
   @include entry(normal);
   &.flat, &.flat:focus {
     padding: 2px;
-    @include entry(normal, $noedge:true);
+    @include entry(normal, $edge:none);
     border: none;
     border-radius: 0;
   }
index bb8690905a830f7e83be4d05e83dd39cee4d4de5..2e46a95c72e92316f0dd82e1665f979857270f21 100644 (file)
   @return linear-gradient(to bottom, darken($c,3%), $c 90%);
 }
 
-@mixin entry($t, $fc:$selected_bg_color, $noedge:false) {
+@mixin entry($t, $fc:$selected_bg_color, $edge: $borders_edge) {
 //
 // Entries drawing function
 //
 // $t: entry type
 // $fc: focus color
-// $noedge: set to true not to draw the bottom edge hilight
+// $edge: set to none to not draw the bottom edge or specify a color to not
+//        use the default one
 //
 // possible $t values:
 // normal, focus, insensitive, backdrop, backdrop-insensitive;
 //
   background-color: transparent;
   background-image: entry_gradient($base_color);
-  $_blank_edge: if($noedge, none, 0 1px transparentize(white,1));
-  $_entry_edge: if($noedge, none, widget_edge());
+  $_blank_edge: if($edge == none, none, 0 1px transparentize($edge,1));
+  $_entry_edge: if($edge == none, none, widget_edge($edge));
   $_inner_shadows: inset 0 3px mix(black, $base_color, 3%),
                    inset 0 1px mix(black, $base_color, 18%);
   @if $variant == 'dark' {
index ac5d2fadbf184cea15d6191fb92a64b2c0507f4f..86d21bf12b4d1de635a3100ac7542845b7a3a07c 100644 (file)
@@ -194,14 +194,14 @@ GtkFlowBox .grid-child {
     color: #c9cbc9;
     border-color: #1e2222;
     background-image: linear-gradient(to bottom, #2c2c2c);
-    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
+    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
   .entry:backdrop:insensitive {
     background-color: transparent;
     background-image: linear-gradient(to bottom, #212121, #292929 90%);
     color: #5d6767;
     border-color: #1e2222;
     background-image: linear-gradient(to bottom, #323636);
-    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
+    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
   .entry:selected, .entry:backdrop:selected {
     background-color: #215d9c;
     color: #ffffff; }
@@ -2872,7 +2872,7 @@ GtkLevelBar.vertical {
     color: #c9cbc9;
     border-color: #1e2222;
     background-image: linear-gradient(to bottom, #2c2c2c);
-    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
+    box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
 .level-bar.fill-block {
   border: 1px solid #1c5187;
   background-color: #215d9c;